# -*- coding:utf-8 -*-
# @Author: shenyuyu
# @Time: 2023/6/15 16:36
# @File: 爬虫.py

import re
import requests

response = requests.get("http://www.gaosan.com/gaokao/583902.html")
print(response)
# with open("911cha.html", "w", encoding="utf8") as f:
#     f.write(response.text)
content = re.findall('<td x:="">(.*?)</td>', re.sub('<td x:="">[\d]+</td>', '', response.text.replace("*", "")), re.S)
content.pop(0)
content.pop(0)

print(content)

for c in content:
    with open("1.txt", "a", encoding="utf8") as f:
        f.write(c + "\n")
